package com.controller;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.alibaba.fastjson.JSON;
import com.mapper.AutoTradeMapper;
import com.pojo.OUser;
import com.pojo.platform;
import com.service.AutoTradeService;

import task.bean.AutoInsertData;

@Controller
@RequestMapping("/")
public class AutoTradeController {

	@Resource
	private AutoTradeMapper autoTradeMapper;

	@RequestMapping("testtest")
	public String testtest(@Param("max") String max, @Param("min") String min,@Param("goodid") String goodid,HttpServletRequest request, Model model) {
		return "jsp/test";
	}
	
	@RequestMapping("Autoinserttrue")
	//@Scheduled(cron = "0/5 * * * * ? ")
	public String Autoinserttrue(@Param("max") String max,HttpServletRequest request, Model model) {
		// 开始自动插入真商品交易
		AutoInsertData autoInsertData =new AutoInsertData();
	
			return "jsp/success";
	}
	
	@RequestMapping("Autoinsertfalse")
	public String Autoinsertfalse(@Param("max") String max, @Param("min") String min,@Param("goodid") String goodid,HttpServletRequest request, Model model) {
		// 开始自动插入假商品交易
		AutoInsertData autoInsertData =new AutoInsertData();
		autoInsertData.insertAutoData(goodid);//
		return null;
	}
	
			
		
		

	
}
